package com.bjpower.common.exceptions.type;

import com.bjpower.common.enums.SysCode;

/**
 * 自定义异常处理类,使用枚举表示错误类型
 */
public class SysException extends RuntimeException{

    private SysCode sysCode;


    public SysException() {

    }

    public SysException(String message) {
        super(message);
    }

    public SysException(SysCode sysCode) {
        super(sysCode.getMessage());
        this.sysCode = sysCode;
    }

    public SysCode getSysCode() {
        return sysCode;
    }

}
